﻿using System.ComponentModel.Composition;
using XSockets.Core.Plugin.MEF;
using XSockets.Core.XSocket.Interface;

namespace XSockets.NET.MVC3.Sandbox.Server
{
    public class WebSocketServer : Composable
    {
        [Import(typeof (IXBaseServerContainer), RequiredCreationPolicy = CreationPolicy.Shared)]
        private IXBaseServerContainer XSocketsServer { get; set; }

        public void Start()
        {
            XSocketsServer.StartServers();
        }

        public void Stop()
        {
            XSocketsServer.StopServers();
        }
    }
}